package com.eden.illness.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

public class GraphPie implements Comparable<GraphPie>{
    //各省名称
    private String name;
    //人数
    private int value;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public GraphPie() {
        super();
    }

    public GraphPie(String name, int value) {
        this.name = name;
        this.value = value;
    }

    @Override
    public int compareTo(GraphPie graphPie) {
        return this.getValue() - graphPie.getValue();
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("name", getName())
                .append("value", getValue())
                .toString();
    }
}
